import * as React from 'react';
import {toJS} from 'mobx';
import {observer} from 'mobx-react';
import {Table} from 'antd';
import {PositionBean} from '../../../../../model/position/Position';
declare let GLOBAL : any;

export const expandedRowRender = (data) =>{
    return () =>{
        const columns = [
            {
                title: '广告位标题',
                dataIndex: 'positionTitle',
                key: 'positionTitle'
            }, {
                title: '广告位名称',
                dataIndex: 'positionName',
                key: 'positionName'
            }, {
                title: '业务方标题',
                dataIndex: 'buTitle',
                key: 'buTitle'
            }, {
                title: '业务方名称',
                dataIndex: 'buName',
                key: 'buName'
            }, {
                title: '应用标题',
                dataIndex: 'appTitle',
                key: 'appTitle'
            }, {
                title: '应用名称',
                dataIndex: 'appName',
                key: 'appName'
            }, {
                title: '平台标题',
                dataIndex: 'platformTitle',
                key: 'platformTitle'
            }, {
                title: '平台名称',
                dataIndex: 'platformName',
                key: 'platformName'
            }, {
                 title: '页面标题',
                 dataIndex: 'pageTitle',
                 key: 'pageTitle'
            }, {
                title: '页面名称',
                dataIndex: 'pageName',
                key: 'pageName'
            }
        ];

        return (
            <Table
                    rowKey="id"
                    indentSize = {0}
                    columns={columns}
                    dataSource={toJS(data)}
                    pagination={false}/>
            );
    }
}